<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQiniuConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qiniu_config', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 32)->unique()->comment('上传名称');
            $table->string('access_key', 100)->comment('access_key');
            $table->string('secret_key', 100)->comment('secret_key');
            $table->string('bucket', 32)->comment('空间名');
            $table->boolean('status')->comment('状态');
            $table->string('url',100)->nullable()->comment('七牛文件地址');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qiniu_config');
    }
}
